def test(x, y):
    print(f'x = {x}')
    print(f'y = {y}')

test(x = 10, y = 20)
test(y = 100, x = 200)


# def add(x, debug = False, y):
#     if debug:
#         print(f'观察传递的参数的值：x = {x}, y = {y}')
#     return x + y
#
# print(add(1, 2))


# def add(x, y, debug = False):
#     if debug:
#         print(f'观察传递的参数的值：x = {x}, y = {y}')
#     return x + y
#
# print(add(1, 2, True))
# print('--------------------------')
# print(add(1, 2))


# def test(n):
#     if n == 1:
#         return 1
#     return n * test(n - 1)
#
# print(test(5))


# def a():
#     print('a')
#
# def b():
#     print('b')
#     a()
#
# def c():
#     print('c')
#     b()
#
# def d():
#     print('d')
#     c()
#
# d()


# # 判断奇数
# def is_odd(n):
#     if n % 2 != 0:
#         return True
#     else:
#         return False
#
# print(is_odd(5))

# result = is_odd(5)
# print(result)


# def test():
#     print("test")
#     print("test2")
#
# print('111')
# test()
# print('222')
# test()



# x = 10
# def test():
#     global x
#     x = 20
#     print(f'函数内部x = {x}')
#
# test()
# print(f'函数外部x = {x}')

# x = 10
# def test():
#     x = 20
#     print(x)
#
# test()


# def test(a):
#     print(a)
#
# test(1)
# test('hello')
# test(True)


# def test():
#     print(f'x = {x}')
#
# x = 20
# test()


# def test():
#     x = 10
#     y = 20
#     print(f'函数内部x={x}, y={y}')
#     return x, y
#
# x, y = test()
# print(f'函数外部x={x}, y={y}')


# def test():
#     x = 10
#     y = 20
#     return x, y
#
# test()
# print(x)
# print(y)

# def test():
#     x = 10
#     y = 20
#     return x, y
#
# x, y = test()
# print(x)
# print(y)


# def test():
#     x = 10
#     y = 20
#     return x, y
#
# _, b = test()
# print(b)

# def test():
#     x = 10
#     y = 20
#     return x, y
#
# a, b = test()
# print(a)
# print(b)


# # 判断奇数
# def is_odd(n):
#     if n % 2 != 0:
#         return True
#     return False
#
# result = is_odd(6)
# print(result)


# # 判断奇数
# def is_odd(n):
#     if n % 2 != 0:
#         return True
#     else:
#         return False
#
# result = is_odd(5)
# print(result)

# def calsum(beg, end):
#     sum = 0
#     for i in range(beg, end):
#         sum += i
#     return sum
#
# result = calsum(1, 101)
# print(result)

# def calsum(beg, end):
#     sum = 0
#     for i in range(beg, end):
#         sum += i
#     print(sum)
#
# calsum(1, 101)
#
#
# # 1~100求和
# sum = 0
# for i in range(1, 101):
#     sum += i
# print(sum)
#
# # 1~200求和
# sum = 0
# for i in range(1, 201):
#     sum += i
# print(sum)
#
# # 1~300求和
# sum = 0
# for i in range(1, 301):
#     sum += i
# print(sum)
#
# def calsum(beg, end):
#     sum = 0
#     for i in range(beg, end):
#         sum += i
#     print(sum)
#
# calsum(1, 101)
# calsum(1, 201)
# calsum(1, 301)
